<!-- 订单销售明细表 -->
<template>
  <!-- <a-row :gutter="10"> -->
  <!-- <a-col :span="4">
      <dealerSelect />
    </a-col> -->
  <!-- <a-col :span="20"> -->
  <a-tabs v-model:activeKey="activeKey" @tabClick="changeTab">
    <a-tab-pane :key="item.value" :tab="`${item.desc}明细`" v-for="item in tabList">
      <component :is="intelligentSalesComponents[item.value as string]" v-if="activeKey === item.value" :key="item.value" />
    </a-tab-pane>
  </a-tabs>
  <!-- </a-col> -->
  <!-- </a-row> -->
</template>
<!--  -->
<script setup lang="ts">
import { intelligentSalesComponents } from './components'
import dealerSelect from './components/dealer-select.vue'
import eventEmitter from '@/lib/event-emitter'
import customEventName from '@/views/business/report/warehouse/intelligent-sales/intelligent-event'
const tabList = [
  { value: 'salesReport', desc: '销售' },
  { value: 'returnReport', desc: '退货' }
]
const activeKey = ref<string>(tabList[0].value as string)
const changeTab = () => {
  eventEmitter.emit(customEventName.RefreshDealerList)
}
</script>
